<template>
  <div style="height: 100%" ref="echartRef"></div>
</template>
<script setup>
import * as echarts from "echarts";
import { onMounted, ref } from "vue";
const props = defineProps({
  options: {
    type: Object,
    requried: true,
  },
});
const echartRef = ref(null);

onMounted(() => {
  const myChart = echarts.init(echartRef.value);
  myChart.setOption(props.options);
});
</script>
